#include <stdio.h>

int main() 
{
    int hour=0;
    int minute=0;
    int k=0;//单位：minute

    0 <= hour <= 23;
    0 <= minute <= 59;
    1 <= k <= 10^9;

    scanf("%d:%d %d",&hour,&minute,&k);

    hour = hour + k / 60;
    minute = minute + k % 60;
    if (minute>=60)
    {
        minute = minute % 60;
        hour = hour + 1;
    }
    hour = hour % 24;
    
    printf("%#02d:%#02d",hour,minute);
    
    return 0;
}